From 7c075bd78016659c453b8cd2b5d74e78793eea22 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Tue, 10 Aug 2004 16:43:47 +0000 Subject: [PATCH] bitkeeper revision 1.1159.18.1 (4118fb43PWr3pgwsfCncpKPp8Ek0Yg) Little cleanup. --- .../arch/xen/kernel/ctrl_if.c | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/linux-2.6.7-xen-sparse/arch/xen/kernel/ctrl_if.c b/linux-2.6.7-xen-sparse/arch/xen/kernel/ctrl_if.c index c5d12db779..c4ace2b6f9 100644 --- a/linux-2.6.7-xen-sparse/arch/xen/kernel/ctrl_if.c +++ b/linux-2.6.7-xen-sparse/arch/xen/kernel/ctrl_if.c @@ -383,21 +383,10 @@ void ctrl_if_suspend(void) unbind_evtchn_from_irq(ctrl_if_evtchn); } -/** Reset the control interface progress pointers. - * Marks the queues empty if 'clear' non-zero. - */ -void ctrl_if_reset(int clear){ - control_if_t *ctrl_if = get_ctrl_if(); - - if(clear){ - *ctrl_if = (control_if_t){}; - } - ctrl_if_tx_resp_cons = ctrl_if->tx_resp_prod; - ctrl_if_rx_req_cons = ctrl_if->rx_resp_prod; -} - void ctrl_if_resume(void) { + control_if_t *ctrl_if = get_ctrl_if(); + if ( start_info.flags & SIF_INITDOMAIN ) { /* @@ -415,7 +404,9 @@ void ctrl_if_resume(void) initdom_ctrlif_domcontroller_port = op.u.bind_interdomain.port2; } - ctrl_if_reset(0); + /* Sync up with shared indexes. */ + ctrl_if_tx_resp_cons = ctrl_if->tx_resp_prod; + ctrl_if_rx_req_cons = ctrl_if->rx_resp_prod; ctrl_if_evtchn = start_info.domain_controller_evtchn; ctrl_if_irq = bind_evtchn_to_irq(ctrl_if_evtchn); @@ -444,7 +435,6 @@ void __init ctrl_if_init(void) spin_lock_init(&ctrl_if_lock); - ctrl_if_reset(1); ctrl_if_resume(); } @@ -455,8 +445,8 @@ static int __init ctrl_if_late_setup(void) safe_to_schedule_task = 1; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ctrl_if_tx_wq = create_workqueue("ctrl_if_tx"); - if (ctrl_if_tx_wq == NULL) - return 1; /* XXX */ + if ( ctrl_if_tx_wq == NULL ) + return 1; #endif return 0; } -- 2.30.2